pico-8 cartridge // http://www.pico-8.com
version 8
__lua__
-- raycaster demo
-- by @powersaurus
-- based heavily on http://lodev.org/cgtutor/raycasting.html
-- and http://lodev.org/cgtutor/raycasting2.html
-- and inspired by the work of @matthughson
-- thanks for advice from @kometbomb and @doyousketch2 and @krajzeg
--
-- Interesting things:
-- - CPU is about 0.8242-0.9 now, down from 0.96 at peak
-- - This includes basic shading!
-- - Split casting walls and floors into separate loops to allow for more efficient palette switching. More work to do here
-- - Raycasting avoids any global access to variables (huge performance boost) (see https://hackernoon.com/lighting-by-hand-3-breath-of-life-7a775617697e for more on this)
-- - Has a single sprite now hooray!
-- - Cats

-- the numbers mean nothing yet,
-- only important thing is non-zero
-- is solid wall
world={
{5,5,5,5,5,5,5,5,5,5,5},
{5,0,0,0,0,-1,-1,0,0,0,5},
{5,0,0,0,0,-1,-1,0,0,0,5},
{5,0,0,0,0,-1,-1,0,0,0,5},
{5,-1,-1,-1,-1,5,5,0,0,0,5},
{5,-1,-1,-1,-1,5,5,0,0,0,5},
{5,0,0,0,0,0,0,0,0,0,5},
{5,0,0,0,0,0,0,0,0,0,5},
{5,0,0,0,0,0,0,0,0,0,5},
{5,5,5,5,5,5,5,5,5,5,5}
}

frames=0
function calculate_fps(now)
 frames+=1
 local newnow=flr(now)
 if (newnow!=lastclock) then
  fps=frames
  frames=0
  lastclock=newnow
 end
end

function _init()
 msg=""
 player={
  a=180,
--  pos={x=5,y=8},
  pos={x=10.9,y=9.9},
  dr={x=-1,y=0}, -- looking west
  cam={0,0.66}
 }
 timer=0
 dist_table={}
 turnplayer(player,45)
  
 for y=0,128 do
  dist_table[y]=128/(2*y-128)
 end

end

function turnplayer(player,ar)
 player.a+=ar
 if player.a>359 then
  player.a-=359
 end
 local r=player.a/360
 local olddrx=player.dr.x
  
 player.dr.x=cos(r)
 player.dr.y=-sin(r)

 local r2=ar/360
 local oldplanex=player.cam[1]
  
 player.cam[1]=oldplanex*cos(r2)+
  player.cam[2]*sin(r2)
 player.cam[2]=-oldplanex*sin(r2)+
  player.cam[2]*cos(r2)
end

function _update()
 timer+=1
 
 if btn(0) then
  turnplayer(player,3)
 end
 if btn(1) then
  turnplayer(player,-3)
 end
 local sp=0.16
 if btn(2) then
  local movex=flr(player.pos.x+player.dr.x*sp)
  local movey=flr(player.pos.y+player.dr.y*sp)
  
  if (world[flr(player.pos.y)][movex]<=0) then player.pos.x+=player.dr.x*sp end
  if (world[movey][flr(player.pos.x)]<=0) then player.pos.y+=player.dr.y*sp end
 end
 if btn(3) then
  local movex=flr(player.pos.x-player.dr.x*sp)
  local movey=flr(player.pos.y-player.dr.y*sp)
  
  if (world[flr(player.pos.y)][movex]<=0) then player.pos.x-=player.dr.x*sp end 
  if (world[movey][flr(player.pos.x)]<=0) then player.pos.y-=player.dr.y*sp end
 end
end

function _draw()
 cls()

 calculate_fps(time())
 timer+=1
 
 draw_perspective(world,player,dist_table)

-- print(fps,2,2,7)
 
-- print("cpu: "..stat(1),2,10,7)
 
--	 print("pos: "..player.pos.x.." "..player.pos.y.." "..player.a,2,19,7)
--	 print("msg: "..msg,2,19,7)
end

function draw_perspective(world,player,dist_table)
 rectfill(0,64,128,128,1)

 local floors={} 
 local zbuf={}
 local check=0
 local prevside=-1
 for x=0,127 do 
  local camx=2*x/128 -1
  local rayx=player.pos.x
  local rayy=player.pos.y
  
  local raydirx=
   player.dr.x+player.cam[1]*camx
  local raydiry=
   player.dr.y+player.cam[2]*camx
   
  local mapx=flr(rayx)
  local mapy=flr(rayy)

  local ddx=sqrt(
   1+(raydiry*raydiry)/(raydirx*raydirx)
  )
  
  local ddy=sqrt(
   1+(raydirx*raydirx)/(raydiry*raydiry)
  )
  
  if abs(raydirx)<0.01 then
   ddx=100
  end
  if abs(raydiry)<0.01 then
   ddy=100
  end
  
  local hit=0
  local side=0
  local stepx=0
  local stepy=0
  local sidedistx=0
  local sidedisty=0
  
  if raydirx<0 then
   stepx=-1 
   sidedistx=(rayx-mapx)*ddx 
  elseif raydirx>0 then
   stepx=1  
   sidedistx=(mapx+1-rayx)*ddx 
  else
   stepx=0
   sidedistx=10000
  end
  
  if raydiry<0 then
   stepy=-1
   sidedisty=(rayy-mapy)*ddy
  elseif raydiry>0 then
   stepy=1  
   sidedisty=(mapy+1-rayy)*ddy
  else
   stepy=0
   sidedisty=10000
  end
  
  while hit==0 do
   if sidedistx<sidedisty then
    sidedistx+=ddx
    mapx+=stepx
    side=0
   else
	   sidedisty+=ddy
    mapy+=stepy
    side=1
   end
   
   if world[mapy][mapx]>0 then
    hit=1
   end
  end
  
  local perpwalldist=0
  
  if side==0 then
   perpwalldist=(mapx-rayx+
    (1-stepx)/2)/raydirx
  else
   perpwalldist=(mapy-rayy+
    (1-stepy)/2)/raydiry
  end
  zbuf[x]=perpwalldist
  
  local lheight=flr(128/perpwalldist)
  local wheight=0--world[mapy][mapx]/perpwalldist
  local dstart=-(lheight+wheight*20)/2+64
  local dend=lheight/2+64
  
  -- hack for being very close
  -- to the wall. doesn't quite
  -- work
  if dstart>=dend then
   dstart=0
   dend=128
  end
  
  local wallx=0
  if side==0 then
   wallx=rayy+perpwalldist*raydiry
  else
   wallx=rayx+perpwalldist*raydirx 
  end
  wallx-=flr(wallx)
  
  local texx=flr(wallx*16)
  if (side==0 and raydirx>0) then texx=16-texx-1 end
  if (side==1 and raydiry<0) then texx=16-texx-1 end
  
-- half the walls get dark palette, only change
-- palette when changing wall direction
  if prevside~=side then
   if side==0 then
    reset_palette()
   else
    dark_palette()
   end
  end
  prevside=side
  
-- draw vertical wall line  
  sspr(texx,0,1,16,x,dstart,1,dend-dstart+1)
  
  local distplayer=0
  local h=128
  
  if (dend<0) then dend=h end
  
  -- draw every other vertical line

  if x%2==0 then
   -- store stripe details for floor casting later
   add(floors,{x,check,dend,raydirx,raydiry})
   -- used to change test and change check every iteration where x%2==0
   -- now just increases and used with a x%2 to get a zero or a one to
   -- offset the points+lines that build up the floor
   check+=1
  end
 end
 
 -- draw all the floor
 floor_cast(floors,world,player,dist_table)
 
 draw_sprite({x=5,y=5},player,zbuf)
end

function floor_cast(floors,world,player,dist_table)
 -- use normal palette for floor
 reset_palette()
 
 local h=128
 for f in all(floors) do
  local x=f[1]
  local check=f[2]
  local dend=f[3]
  local raydirx=f[4]
  local raydiry=f[5]
  
  local start_dither=98+7*sin(x/256)
  
  for y=h-check%2,dend+10,-2 do
   local curdist=dist_table[y]

   local cfloorx=curdist*raydirx+player.pos.x
   local cfloory=curdist*raydiry+player.pos.y

   local floortex=1+abs(world[flr(cfloory)][flr(cfloorx)])
   local floortexx=floortex*16+(cfloorx*16)%16
   local floortexy=(cfloory*16)%16
   
   -- dither band
   if y<start_dither then
    pset(x,y,sget(floortexx,floortexy))
   else -- line band with 'guessed' colour    
    line(x,y,x+3,y,sget(floortexx,floortexy))
   end
  end
 end
end

function draw_sprite(s,player,zbuf)
 local pos=player.pos
 local dr=player.dr
 local cam=player.cam
 
 local tex_width=32
 local s_x=s.x-pos.x
 local s_y=s.y-pos.y
 
 local s_dist=
  sqrt(s_x*s_x+s_y*s_y)
 
-- msg="s="..s_dist
 
 local invdet=1.0/
  (cam[1]*dr.y-
   cam[2]*dr.x
  )
 local t_x=invdet*(
  dr.y*s_x-
  dr.x*s_y
 )
 local t_y=invdet*(
 -cam[2]*s_x+
  cam[1]*s_y
 )
 
 local sscr_x=flr(64*(1+t_x/t_y))
 local s_height=flr(abs(128/t_y))

 local ds_y=-s_height/2+64
 if (ds_y<0) then ds_y=0 end

 local de_y=s_height/2+64
 if (de_y<0) then de_y=127 end
 
 local s_width=s_height
 local ds_x=-s_width/2+sscr_x
 if ds_x<0 then
  ds_x=0
 end
 local de_x=s_width/2+sscr_x
 if (de_x>=128) then de_x=127 end
 
 if t_y>0 and t_y<128 then
  for i=ds_x,de_x do

   if zbuf[flr(i)]>s_dist then
    local texx=(
     i-(-s_width/2+sscr_x))*31 /s_width
    
    sspr(texx,64,1,32,i,ds_y,1,s_height)
   end
  end
 end
end

function reset_palette()
 pal()
 palt(0,false)
 palt(12,true)
end

function dark_palette()
 pal(0,0)
 pal(1,1)
 pal(2,1)
 pal(3,0)
 pal(4,2)
 pal(5,2)
 pal(6,5)
 pal(7,6)
 pal(8,2)
 pal(9,4)
 pal(10,4)
 pal(11,2)
 pal(12,5)
 pal(13,1)
 pal(14,4)
 pal(15,4)
end
__gfx__
22222222452442225111511311b1153b11222111111222115111511311b1153b111111111111111d111111111111111deeeeeeeeeeeeeeee0000000000000000
22224522442242521311131b1131113141111144221151141311131b11311131155555555555555d15d15d15d15d15ddeeeeeeeeeeeeeeee0000000000000000
24524422242222421331111b1131111122111422222111421331111b11311111155555d55555555d15d15d15d15d15ddeeeeeeeeeeeeeeee0000000000000000
54524222222252221b31511b5115131122211222222211221b31511b5115131115555d555555555d15d15d15d15d15ddeeeeeeeeeeeeeeee0000000000000000
444242445225522513b3111b11131351252112225252112213b3111b111313511555d555555d555d15d15d15d15d15ddeeeeeeeeeeeeeeee0000000000000000
44522224442444241b33131313311b1152111525252111121b33131313311b11155d555555d5555d15d15d15d1dd15ddeeeeeeeeeeeeeeee0000000000000000
44222222242444221b3b111331311b1111111111111111111b3b111331311b11155555555d55555d15d15d15515d15ddeeeeeeeeeeeeeeee0000000000000000
24255242242242221b3315111111131111442211144222111b33151111111311155555555555555d15515d15d15d15ddeeeeeeeeeeeeeeee0000000000000000
222452442412222113b3111311531351142222144222221113b3111311531351155555555555555d15d15d15d15d15ddeeeeeeeeeeeeeeee0000000000000000
22244244222244121b3135131511111112222512222221111b313513151111111555555555d5555d15d15d15d1dd155deeeeeeeeeeeeeeee0000000000000000
1214422221214422131b31b1111151511125211222221144131b31b111115151155555555d55555d15d15d15d15d15ddeeeeeeeeeeeeeeee0000000000000000
2224421441124224151331b5311111312111112252511422151331b53111113115555555d555555d15d15d15d15d15ddeeeeeeeeeeeeeeee0000000000000000
42122112441221441115133131511131511111252511122211151331315111311555555d5555555d1551551d5155155deeeeeeeeeeeeeeee0000000000000000
422442214422424451111111111131b3114421125114115251111111111131b31555d5555555555d155155155155155deeeeeeeeeeeeeeee0000000000000000
1214411222244124115311151131313b1422221111422111115311151131313b155d55555555556d155155155155156deeeeeeeeeeeeeeee0000000000000000
21112111141411121113311111b1113b12222211112222111113311111b1113bddddddddddddddd611d11d11d11d11d6eeeeeeeeeeeeeeee0000000000000000
0202020205040202112d31111112221155555551d555555511c111111ccd11110000000000000000000000000000000000000000000000000000000000000000
202040204020405041d3b34422115114dddddd51dddddddd1cc11111dcccd1110000000000000000000000000000000000000000000000000000000000000000
0402040204020202221b34222221114276676651d6767666ccdc1111ccdccccc0000000000000000000000000000000000000000000000000000000000000000
50504020202050202223b2222222112267667651d6676766111ccccccdddcc110000000000000000000000000000000000000000000000000000000000000000
040202040205020525213222525211226676765156766776111c1111c1111c110000000000000000000000000000000000000000000000000000000000000000
40502020402040205211152525211112676676515766766611ccd11dc1111c110000000000000000000000000000000000000000000000000000000000000000
040202020404040211111111111111116776765156766767ccddc11cc111cccc0000000000000000000000000000000000000000000000000000000000000000
202050402020402011442211143d33117667765156667676c11dcccccc11cc1c0000000000000000000000000000000000000000000000000000000000000000
0204020404120201142222144223b2117767675156766667c1111c11dccccd1c0000000000000000000000000000000000000000000000000000000000000000
202040402020401012222512222b31116676675156676676c1111c111111c11c0000000000000000000000000000000000000000000000000000000000000000
121402020101040211252112222231446766775156766766cc11cc111111ccc10000000000000000000000000000000000000000000000000000000000000000
2020401040104020211111225251142267767651576677671ccccccccd111ccc0000000000000000000000000000000000000000000000000000000000000000
021201020402010451133125251112226767765156767676cc1dcd1dccd1ccd10000000000000000000000000000000000000000000000000000000000000000
40204020402040401143b1125114115266666651566666661c1c11111ccccd110000000000000000000000000000000000000000000000000000000000000000
02040102020401041422321111422111d7dd75155dd6dd6d11cc11111dccd1110000000000000000000000000000000000000000000000000000000000000000
20102010101010101222221111222211111111111111111111c111111cc111110000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
cccc0000ccccccccccccc00000ccccccbbbbbb00bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb00bbbbbbbbbbbbbbbb000bbbbbb0000000bbbbbbbbbbbbbbbbbbbbbbbb
cccc055500cc000000c005f550ccccccbbbbbb000bbbbbbbbbbbbbb0000bbbbbbbbbbb050bbbbbbbbbbbbbb0dd0bbbbbb09999990bbbbbbbbbbbbbbbb00000bb
cccc055ff5005555550555f50cccccccbbbbbb0500bb0000000bb000000bbbbbbbbbbb05500b000000000b00d0bbbbbbbb09ffff0000000000000000099990bb
ccccc05fff05555555550ff50cccccccbbbbbb06600000000000006500bbbbbbbbbbbb00f500dd55d55dd00ff0bbbbbbbbb09fff99999999999999999ff90bbb
ccccc05fff055555555550f50cccccccbbbbbbb065000111111005660bbbbbbbbbbbbbb0ff55ddd5d5dddddf0bbbbbbbbbbb040094444444444444444090bbbb
ccccc05000500005555500050cccccccbbbbbbb050000011111000500bbbbbbbbbbbbbb0000000d5d5d000000bbbbbbbbbbb04999000000000000000090bbbbb
cccccc01150aaaa05550aaa0ccccccccbbbbbbb0000aaa00000aa000bbbbbbbbbbbbbbb050aaaa06660aaaa00bbbbbbbbbbb0499990aaa099990aaa0990bbbbb
cccccc01150aa0a05550a0a0ccccccccbbbbbbb000aaaaa070aaaa00bbbbbbbbbbbbbbb050aa0a06660aa0a00bbbbbbbbbbb0ff9990a0a099990a0a0ff0bbbbb
ccccccc0150aa0a05550a0a0ccccccccbbbbbbb000aaa0a070aa0a00bbbbbbbbbbbbbbb050aa0a06660aa0a00bbbbbbbbbbb0449990a0a099990a0a0990bbbbb
ccccccc0150aaaa05550aaa00cccccccbbbbbbb000aaa0a070aa0a00bbbbbbbbbbbbbbb000aaaa06660aaaa00bbbbbbbbbbb0ff9990aaa099990aaa0ff0bbbbb
ccccccc015500005005500050cccccccbbbbbbb0000aaa07770aa000bbbbbbbbbbbbbbb005000060006000000bbbbbbbbbbb044499900009009900000000bbbb
ccccccc011555555005555550cccccccbbbbbbb00dd0007000700700bbbbbbbbbbbbbbb0555ddddd00dddddd0bbbbbbbbbbb04400009999900999909990bbbbb
ccccccc01100555000055500ccccccccbbbbbbb00dddd7770777d000bbbbbbbbbbbbbbb0555ddd0000dddddd0bbbbbbbbbbb00444449999099099990990bbbbb
ccccccc01110000055000010ccccccccbbbbbbb00ddddd00700dd00bbbbbbbbbbbbbbbb0055000555500dd00bbbbbbbbbbbbb0044009990999909999000bbbbb
cccccccc011111555555110cccccccccbbbbbbbb0011d7777711100bbbbbbbbbbbbbbbbb005555005555d00bbbbbbbbbbbbbbb0000999999999999990bbbbbbb
ccccccc001111111155550ccccccccccbbbbbbbbb0dd1111111dd0bbbbbbbbbbbbbbbbbbb0000555550000bbbbbbbbbbbbbb00004444444444444444000bbbbb
ccccccc011111115555500ccccccccccbbbbbbb000ddddddddd770bbbbbbbbbbbbbbbbb0005555555555d000bbbbbbbbbbb0044444444444444444449900bbbb
cccccc01111555555555550cccccccccbbbbbb000011d777777770bbbbbbbbbbbbbbbb0555666555555d66600bbbbbbbbbb04444444444444444444999900bbb
ccccc0111155555555555550ccccccccbbbbbb000111d7777777700bbbbbbbbbbbbbbb055555dd5555ddddd00bbbbbbbbb0444444499444444444499999900bb
ccccc01111555555555555550cccccccbbbbb0000111d7777777000bbbbbbbbbbbbbb0555666dddddddddddd00bbbbbbbb0444444999999999999999999990bb
ccccc011115555555555555500ccccccbbbbb0000011d77777770000bbbbbbbbbbbbb055555ddddd6666dd6600bbbbbbbb0444444999999999999999999990bb
cccc0111115555555555555550ccccccbbbbb0000000d77777770100bbbbbbbbbbbbb055566dddd666666dddd00bbbbbbb04ffff499999999999999999fff0bb
cccc0111115555555555555550ccccccbbbb00000000d777777001000bbbbbbbbbbbb0000005dd66666666dd000bbbbbbb0444444999999999999999999990bb
cccc0111115555555555555550ccccccbbbb000000000d77777001100bbbbbbbbbbbb0000005dd66666666d6660bbbbbbb0444444999999999999999999990bb
cccc01111155555555555555550cccccbbbb0000011000d77700111000bbbbbbbbbbb0556666d6666666666dd00bbbbbbb0444444999999999999999999990bb
ccc011111115555555555555550cccccbbbb0000011000077700111100bbbbbbbbbb00565555d6666666666d6600bbbbbb04ffff499999999999999999fff0bb
ccc011111115555555555555550cccccbbb00000011100007001111100bbbbbbbbbb00000055d6666666666d0000bbbbbb0444444999999999999999999990bb
ccc011111115555555555555550cccccbbb00000011100000001111100bbbbbbbbbb00006665d6666666666dddd0bbbbbb0444444999999999999999999990bb
ccc011111115555555555555550cccccbbb00000011100000011111100bbbbbbbbbb05555555d6666666666dddd0bbbbbb0444444999999999999999999990bb
ccc011111115555555555555550cccccbbb00000011100000011111100bbbbbbbbbb055666665666666666666660bbbbbb04ffff499999999999999999fff0bb
ccc011111111555555555555550cccccbbb00000011110000111111100bbbbbbbbbb0555555556666666666d0000bbbbbb0444444999999999999999999990bb
ccc011111111555555555555550cccccbbb00000011110000111111100bbbbbbbbbb0000005556666666666dddd0bbbbbb0444444999999999999999999990bb
e00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
10000000e0000000e0000000e0000000e0000000e0000000e0000000e0000000e0000000e0000000e0000000e0000000e0000000e0000000e0000000e0000005
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005
__gff__
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__map__
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__sfx__
000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__music__
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344
00 41424344

